Recently, several microscopic techniques were developed for determining the carrier distribution in semiconductor structures. In each of these techniques, an ultrafine probe is used to measure an (electrical) variable which is related to the carrier concentration at the position of the probe. For example, in the nanospreading resistance profiling method (nano-SRP) as described in references "P. De Wolf, T. Clarysse, W. Vandervorst, J. Snauwaert, and L. Hellemans, J. Vac. Sci. Technol. B 14, 380 (1996).", "P. De Wolf, J. Snauwaert, L. Hellemans, T. Clarysse, W. Vandervorst, M. D'Olieslaeger, and D. Quaehaegens, J. Vac. Sci. Technol. A 13, 1699 (1995).", "U.S. Pat. Nos. 5,369,372 & 5,585,734." the resistance R is measured between a conductive atomic force microscope (AFM) probe and a large contact connected to the back of the semiconductor while the probe is stepped across the semiconductor cross section. The measured resistance is dominated by the spreading resistance at the probe-semiconductor contact, which is a measure for the local carrier concentration. Another example, the scanning capacitance microscopy (SCM) as described in "Y. Huang, C. C. Williams, and J. J. Slinkman, Appl. Phys. Lett. 66, 344-346 (1995).", "G. Neubauer, A. Erickson, C. C. Williams, J. J. Kopanski, M. Rodgers, and D. Adderton, J. Vac. Sci. Technol. B14, 426 (1996).", "J. J. Kopanski, J. F. Marchiando, and J. R. Lowney, J. Vac. Sci. Technol. B14, 242 (1996)." monitors the capacitance C between an AFM probe and a semiconductor surface or its derivative .differential.C/.differential.V while the probe is moved across the semiconductor cross section. The measured capacitance or capacitive gradient as a function of bias voltage provides a direct measurement of the local activated dopant density. By using AFM technology, each of these techniques obtains a high spatial resolution comparable to the average radius of the probe-semiconductor contact. Yet, besides a high resolution (currently around 20 nm), also a high accuracy of the dopant concentration is required by current and future silicon technologies: typically 10% for a 0.25 .mu.m integrated circuit (IC) technology and 5% for a 0.18 .mu.m IC technology as described in "L. Larson, and M. Duane, NIST Workshop on Industrial Applications of Scanning Probe Microscopy, Gaithersburg MD, Mar 24-25 (1994).". This accuracy can only be obtained when the electrical measurements (either resistance, capacitance or any other quantity) are reproducible, noise-free and when the relation between the measured data and the underlying carrier profile is exactly known. For semi-infinite uniformly doped semiconductor samples this relation is known from theory or from a set of calibration measurements. For example, in nano-SRP the spreading resistance R of a non-penetrating, circular (radius .alpha.), Ohmic probe contact on a uniformly doped semiconductor (resistivity r) is given by equation (eq1).: ##EQU1## The relation between the resisitivity and the carrier concentration is given by a coupled set of differential equations consisting of the mobility and Poisson equations "Sze, Semiconductor Physics, J. Wiley & Sons, New York, 1981.". For contacts which are not ideal, equation (1) is replaced by a set of calibration curves which plot the resistance measured on homogeneously doped semiconductors as a function of their resistivity as described in "P. De Wolf, J. Snauwaert, L. Hellemans, T. Clarysse, W. Vandervorst, M. D'Olieslaeger, and D. Quaehaegens, J. Vac. Sci. Technol. A 13, 1699 (1995).". In this way, one n-type and one p-type curve is constructed. For non-homogeneously doped semiconductors there is a problem in the art. Since all techniques measure on the cross section of a semiconductor, other regions of the profile (containing different carrier concentrations) are very near and the electrical measurement can be dominated by the highly (or poorly) doped parts of the carrier profile. Thus, the electrical value measured at a position x is no longer exclusively determined by the carrier concentration at x, but by the entire surrounding carrier profile. As a consequence, the theoretical relation and the calibration curves can no longer be used directly to transform the measured profile into the correct carrier concentration profile.